home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
c_lib.arc
/
PCFREE.C
< prev
next >
Wrap
Text File
|
1990-08-09
|
979b
|
37 lines
/**
*
* Name pcfree -- Release an allocated memory block
*
* Synopsis ercode = pcfree(seg);
* int ercode Returned error code
* unsigned seg Segment address of memory block
*
* Description This function frees memory blocks which have been
* allocated by the PCALLOC function. The segment address
* of the memory block to be released must be associated
* with a previously allocated block.
*
* Returns ercode DOS 2.0 function return code
*
* Version 1.1 (C)Copyright Blaise Computing Inc. 1983, 1984
*
**/
struct dreg
{
unsigned ax,bx,cx,dx,si,di,ds,es;
};
int pcfree(seg)
unsigned seg;
{
struct dreg dos_reg;
utinit(&dos_reg); /* Initialize the registers */
dos_reg.ax = 0x4900; /* DOS function 49h */
dos_reg.es = seg;
return(dos(&dos_reg));
}